Kill all other uses of $wgHooks in includeExtensions() other than LoadExtensionSchema...
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 1 Mar 2011 17:54:15 +0000 (17:54 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 1 Mar 2011 17:54:15 +0000 (17:54 +0000)
includes/installer/Installer.php

index b812ad7..ae8b68a 100644 (file)
@@ -1215,6 +1215,14 @@ abstract class Installer {
                        require( "$path/$e/$e.php" );
                }
 
+               $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?
+                       $wgHooks['LoadExtensionSchemaUpdates'] : array();
+
+               // Unset everyone else's hooks. Lord knows what someone might be doing
+               // in ParserFirstCallInit (see bug 27171)
+               unset( $wgHooks );
+               $wgHooks = array( 'LoadExtensionSchemaUpdates' => $hooksWeWant );
+
                return Status::newGood();
        }